﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetEmpDepTree.aspx.cs" Inherits="CMS_Role_GetEmpDepTree" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script>
        function GetId() {
            var getAllNodes = "";

            var tv=Get("span","ttv"); 

            for (var i = 0; i < tv.length; i++) {
                var ck = tv[i].childNodes[0];
                if (ck.checked) {
                    getAllNodes += (ck.id.split("\\"))[1] + "|" + ck.name + ";";
                }
            }

            return getAllNodes.substring(0,getAllNodes.length - 1);

        }


        function Get(tag, eltname) {

            var elts = document.getElementsByTagName(tag);
            var count = 0;
            var elements = [];
            for (var i = 0; i < elts.length; i++) {
                if (elts[i].getAttribute("name") == eltname) {
                    elements[count++] = elts[i];
                }
            }
            return elements;

        } 
      

     

    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:TreeView ID="DptEmp" runat="server" ShowLines="True" Height="100%" 
        Width="100%" ExpandDepth="1">
    </asp:TreeView>
    </form>
</body>
</html>
